package apiday02homework01;

import java.util.Arrays;

public class SplintDemo  {
    public static void main(String[] args) {
//        String line = "abc123def456ghi";
//        String[]data = line.split("[0-9]+");
//        System.out.println(Arrays.toString(data));
//
//        line = "123.456.78";
//        data = line.split("\\.");
//        System.out.println(Arrays.toString(data));
//
//        line = ".123.456..78.....";
//        data = line.split("\\.");
//        System.out.println(Arrays.toString(data));
//        System.out.println(data.length);



//        String line = "abc123def456";
//        String []data = line.split("[0-9]+");
//        System.out.println(Arrays.toString(data));
//
//        line = "123.456.78";
//        data = line.split("\\.");
//        System.out.println(Arrays.toString(data));
//
//        line = ".123.456..78...";
//        data = line.split("\\.");
//        System.out.println(Arrays.toString(data));
//        System.out.println(data.length);

        String line = "abc123def456";
        String []data = line.split("[0-9]+");
        System.out.println(Arrays.toString(data));

        line = "123.456.789";
        data = line.split("\\.");
        System.out.println(Arrays.toString(data));

        line = ".123.456..789...";
        data = line.split("\\.");
        System.out.println(Arrays.toString(data));
        System.out.println(data.length);

    }
}
